#include <iostream>
#include <log4c.h>

sg_log_t* log = sg_log4c_init(NULL,SG_ALL);

/* c++ style */
namespace sg
{
	class Notebook
	{
	public:
		Notebook(const char* sn){this->sn = sn;sg_log4c_write(log,SG_TRACE,"New Class Notebook");}
	
		void ShowSequenceNumber(){sg_log4c_write(log,SG_TRACE,this->sn);}

	private:	
		int id;
		const char* sn;
	};

};

/* c style */
struct notebook_t 
{
	int id;
	const char* sn;
};

void show_sequence_number(struct notebook_t* notebook)
{
	sg_log4c_write(log,SG_TRACE,notebook->sn);
}

int main()
{


	sg::Notebook pc1("1234567890");
	pc1.ShowSequenceNumber();
	
	
	notebook_t pc2; 
	pc2.sn = "0987654321";
	show_sequence_number(&pc2);

	sg_log4c_destroy(log);
	return 0;
}
